Skip to content

ENT-14444: Added cfengine test i2, now reports a test-suite using the assert-promise module - #250

Open
SimonThalvorsen wants to merge 1 commit into
cfengine:mainfrom
SimonThalvorsen:test-test
Open

SimonThalvorsen wants to merge 1 commit into
cfengine:mainfrom
SimonThalvorsen:test-test

Conversation

@SimonThalvorsen

Copy link
Copy Markdown
Contributor

Runs test_*.cf files or a deployed policy's own assert: promises (or just a plain built-policy run) in disposable Docker container and reports a pytest-style pass/fail summary.
Adds --dockerfile/--rebuild flags for testing against a custom base image.

Ticket: ENT-14444

@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.12281% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.87%. Comparing base (2f4c015) to head (03ad63f).

Files with missing lines Patch % Lines
...cfengine_cli/cfengine_wrapper/cfengine_commands.py 86.66% 2 Missing ⚠️
src/cfengine_cli/container.py 99.53% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #250      +/-   ##
==========================================
+ Coverage   54.65%   57.87%   +3.22%     
==========================================
  Files          33       34       +1     
  Lines        4256     4582     +326     
==========================================
+ Hits         2326     2652     +326     
  Misses       1930     1930              
Files with missing lines Coverage Δ
src/cfengine_cli/commands.py 58.18% <100.00%> (-0.16%) ⬇️
src/cfengine_cli/main.py 61.78% <100.00%> (+0.47%) ⬆️
src/cfengine_cli/report.py 100.00% <100.00%> (ø)
src/cfengine_cli/container.py 99.55% <99.53%> (+10.08%) ⬆️
...cfengine_cli/cfengine_wrapper/cfengine_commands.py 32.21% <86.66%> (+2.56%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@olehermanse

Copy link
Copy Markdown
Member

@SimonThalvorsen is this done and ready for review?

@SimonThalvorsen

Copy link
Copy Markdown
Contributor Author

@SimonThalvorsen is this done and ready for review?

@olehermanse partly. The general idea is there, have put it on hold for now, so not super well tested, but feedback is welcome

…-promise module

Runs test_*.cf files or a deployed policy's own assert: promises
(or just a plain built-policy run) in disposable Docker container
and reports a pytest-style pass/fail summary.
Adds --dockerfile/--rebuild flags for testing against a custom base image.

Ticket: ENT-14444
Signed-off-by: Simon Halvorsen <simon.halvorsen@northern.tech>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants